import React, {Component, Fragment} from 'react';
import { Modal, Button } from 'antd';
import PageContent from '@/layouts/page-content';
import config from '@/commons/config-hoc';
// import './style.less';
import './index2.css';

@config({
    path: '/modeltest',
    ajax: true,
})

export default class Modeltest extends Component {
    state = { visible: false };

    showModal = () => {
        this.setState({
            visible: true,
        });
    };

    handleOk = e => {
        console.log(e);
        this.setState({
            visible: false,
        });
    };

    handleCancel = e => {
        console.log(e);
        this.setState({
            visible: false,
        });
    };


    render() {

        return (
            <PageContent>
                <div>
                    <Button type="primary" onClick={this.showModal}>
                        Open Modal
                    </Button>
                    <div className="modetest">
                        ddddddddddddddddddd
                    </div>
                    <Modal
                        id="testmo"
                        wrapClassName="modetestmmm"
                        title="Basic Modal"
                        visible={this.state.visible}
                        onOk={this.handleOk}
                        onCancel={this.handleCancel}
                    >
                        <p>Some contents...</p>
                        <p>Some contents...</p>
                        <p>Some contents...</p>
                    </Modal>
                </div>
            </PageContent>
        );
    }
}
